Method: Set.[]

Defined in:
lib/set.rb

.[](*ary) ⇒ Object

Creates a new set containing the given objects.

Set[1, 2]                   # => #<Set: {1, 2}>
Set[1, 2, 1]                # => #<Set: {1, 2}>
Set[1, 'c', :s]             # => #<Set: {1, "c", :s}>
[View source]

228
229
230
# File 'lib/set.rb', line 228

def self.[](*ary)
  new(ary)
end